import Vue from 'vue'
import moment from 'moment'
Vue.mixin({

  methods: {
    hasAuth (perm) {
      var authority = this.$store.state.menus.permList
      return authority.indexOf(perm) > -1
    },
    // 时间格式化
    dateFormat (row, col) {
      debugger
      var date = row[col.property]
      if (date === undefined) {
        return ''
      }
      return moment(date).format('YYYY-MM-DD HH:mm:ss')
    }
  }
})
